package cn.iocoder.yudao.module.data.controller.admin.ds.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author gukun
 */
@Schema(description = "管理后台 - 分类 Response VO")
@Data
@ExcelIgnoreUnannotated
//CREATE TABLE `data_ds_table` (
//        `id` bigint NOT NULL COMMENT 'ID',
//        `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '名称',
//        `table_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '物理表名',
//        `datasource_id` bigint DEFAULT NULL COMMENT '数据源ID',
//        `dataset_group_id` bigint NOT NULL COMMENT '数据集ID',
//        `type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT 'db,sql,union,excel,api',
//        `info` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '表原始信息,表名,sql等',
//        `sql_variable_details` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT 'SQL参数',
//        PRIMARY KEY (`id`)
//) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='table数据集';
public class DsRespVO {
    //根据表结构生成返回字段
    //CREATE TABLE `data_ds_table` (
    //        `id` bigint NOT NULL COMMENT 'ID',
    //        `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '名称',
    //        `table_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '物理表名',
    //        `datasource_id` bigint DEFAULT NULL COMMENT '数据源ID',
    //        `dataset_group_id` bigint NOT NULL COMMENT '数据集ID',
    //        `type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT 'db,sql,union,excel,api',
    //        `info` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '表原始信息,表名,sql等',
    //        `sql_variable_details` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT 'SQL参数',
    //        PRIMARY KEY (`id`)
    //) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='table数据集';

    @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty(value = "ID", index = 0)
    private Long id;

    @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @ExcelProperty(value = "名称", index = 1)
    private String name;

    @Schema(description = "描述", example = "你猜")
    @ExcelProperty(value = "描述", index = 2)
    private String description;

    @Schema(description = "物理表名", example = "你猜")
    @ExcelProperty(value = "物理表名", index = 3)
    private String tableName;

    @Schema(description = "数据源ID", example = "1")
    @ExcelProperty(value = "数据源ID", index = 4)
    private Long dsId;

    @Schema(description = "数据集ID", example = "1")
    @ExcelProperty(value = "数据集ID", index = 5)
    private Long datasetGroupId;

    @Schema(description = "类型", example = "db")
    @ExcelProperty(value = "类型", index = 6)
    private String type;

    @Schema(description = "表原始信息,表名,sql等")
    @ExcelProperty(value = "表原始信息,表名,sql等", index = 7)
    private String info;

    @Schema(description = "SQL参数")
    @ExcelProperty(value = "SQL参数", index = 8)
    private String sqlVariableDetails;


}